#include "demo.h"
#include "rtt/RTT/SEGGER_RTT.h"
#include <stdio.h>

//#define   USE_RTT

void app_demo_task(void *p_arg)
{
    long int s_tick, e_tick;
    int i;
    (void)p_arg;
    
    s_tick = OSTimeGet();
    for(i = 0; i < 1500; i++)
    {
#ifdef USE_RTT
        SEGGER_RTT_printf(0, "c");
#else
        printf("c");
#endif
    }
    e_tick = OSTimeGet();
#ifdef USE_RTT
    SEGGER_RTT_printf(0, "\r\nStart Timer: %d\r\n", s_tick);
    SEGGER_RTT_printf(0, "End Timer: %d\r\n", e_tick);
#else
    printf("\r\nStart Timer: %d\r\n", s_tick);
    printf("End Timer: %d\r\n", e_tick);
#endif
    
    while(1)
    {
        OSTimeDly(1000);
    }
}